package com.stn.zjx.givingtreasure.activity.bi;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.came.viewbguilib.ButtonBgUi;
import com.stn.zjx.givingtreasure.MainActivity;
import com.stn.zjx.givingtreasure.R;
import com.stn.zjx.givingtreasure.activity.web.GenericWebActivity;
import com.stn.zjx.givingtreasure.base.BaseActivity;
import com.stn.zjx.givingtreasure.event.CreateImportEthWalletEvent;
import com.stn.zjx.givingtreasure.event.NetWorkEvent;
import com.vondear.rxtools.RxActivityTool;

import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class FirstCreateWhatBlockActivity extends BaseActivity {


    @BindView(R.id.back_bt)
    RelativeLayout backBt;
    @BindView(R.id.action_title)
    TextView actionTitle;
    @BindView(R.id.web_title)
    TextView webTitle;
    @BindView(R.id.action_add_bt)
    RelativeLayout actionAddBt;
    @BindView(R.id.action_refresh)
    RelativeLayout actionRefresh;
    @BindView(R.id.exit)
    RelativeLayout exit;
    @BindView(R.id.sure_bt)
    TextView sureBt;
    @BindView(R.id.skip_bt)
    TextView skipBt;
    @BindView(R.id.share_bt)
    RelativeLayout shareBt;
    @BindView(R.id.more_bt)
    RelativeLayout moreBt;
    @BindView(R.id.release_bt)
    ButtonBgUi releaseBt;
    @BindView(R.id.create_bt)
    ButtonBgUi createBt;
    @BindView(R.id.baidu_bt)
    ButtonBgUi baiduBt;

    @Override
    public void networkStatus(NetWorkEvent netWorkEvent) {

    }

    @Override
    public void initComponent() {
        actionTitle.setText(getString(R.string.know_block));

    }
    @Subscribe(threadMode = ThreadMode.MAIN)
    public void onCreateImportEth(CreateImportEthWalletEvent event){
        finish();
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_block_chain_introduce);
        ButterKnife.bind(this);
        initComponent();
    }


    @OnClick({R.id.back_bt,R.id.create_bt,R.id.baidu_bt})
    public void onViewClicked(View view) {
          Bundle bundle=new Bundle();
        switch (view.getId()) {
            case R.id.back_bt:
                finish();
                break;
            case R.id.create_bt:
                RxActivityTool.skipActivity(this,CreateEthWalletActivity.class);
                break;
            case R.id.baidu_bt:
                bundle.putString("url","https://baike.baidu.com/item/%E5%8C%BA%E5%9D%97%E9%93%BE%E6%8A%80%E6%9C%AF/19527708");
                RxActivityTool.skipActivity(this,GenericWebActivity.class,bundle);
                break;

        }
    }


}
